package work20241207_chap8.r_demo15;

/**
 * @author zdl
 * @date 2024/12/5
 */

public class Demo {
    public static void main(String[] args) {
        /*Employee[] employees = new Employee[4];
        employees[0] = new SalariedEmployee("张三",12,4000);
        employees[1] = new HourlyEmployee("李四",12,30,170);
        employees[2] = new SalesEmployee("王五",12,3000,0.2);
        employees[3] = new BasePlusSalesEmployee("刘琦",12,2000,0.2,2000);
        for (Employee e:employees) {
            System.out.println(e.getName()+"的工资为:"+e.getSalary(12));
        }
        System.out.println();
        for (int i = 0; i < employees.length; i++) {
            System.out.println(employees[i].getSalary(12));
        }*/
        SalariedEmployee s = new SalariedEmployee("tom", 12, 2000);
        SalariedEmployee s1 = new SalariedEmployee("tom", 12, 2000);
        BasePlusSalesEmployee b = new BasePlusSalesEmployee("刘琦", 12, 2000, 0.2, 1000);
        BasePlusSalesEmployee b1 = new BasePlusSalesEmployee("刘琦", 12, 2000, 0.2, 1000);
        Employee[] employees = new Employee[4];
        employees[0] = s;
        employees[1] = b;
        employees[2] = s1;
        employees[3] = b1;
        Employee e = new Employee();
        double a = e.overTimePays(employees);
        System.out.println(a);

    }
}
